<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    fetch('http://localhost:3000/json')
    .then(function (data) {
        // return data.json()
        return data.text()
    })
    .then(function (data) {
        // console.log(data)
        // console.log(data.uname)
        var obj=JSON.parse(data)
        console.log(obj)
        console.log(obj.uname)
    })
</script>
</body>
</html>